<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/* JoomLeague League Management and Prediction Game for Joomla!
 * @version $Id: edit_form_clubs.tpl.php 1126 2008-06-09 05:45:04Z julienv $
 * @package Joomleague
 * @copyright Copyright (C) 2007  JoomLeague
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see _joomleague_license.txt
 *  
 * Homepage: http://www.joomleague.de
 * Support: htt://www.joomleague.de/forum/
 * 
 * This file is part of JoomLeague.
 *  
 * JoomLeague is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * Please note that the GPL states that any headers in files and
 * Copyright notices as well as credits in headers, source files
 * and output (screens, prints, etc.) can not be removed.
 * You can extend them with your own credits, though...
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/copyleft/gpl.html.
*/ 

?>

<script language="javascript" type="text/javascript">
    function submitbutton(pressbutton) {
            var form = document.adminForm;
     if (pressbutton == 'cancel') {
     			  submitform( pressbutton );
      		  return;
            }
            // do field validation
            if (form.name.value == ""){
             alert( "<?php echo _JL_ADMIN_EDIT_FORM_CLUBS_JS_CHECK;?>" );
           }
            else {
                submitform( pressbutton );
            }
    }
    function updateClubLogo(name, element) {
      var icon = document.getElementById(name);
      icon.src = '<?php echo _JOOMLA_JL_LIVE_SITE; ?>'+element.value;
      icon.title = element.value;
      icon.alt = element.value;
    }
</script>

<form action="index2.php" method="post" name="adminForm">
<div id="right">
	<div id="rightpad">

<!-- Header START -->		
		<div id="step">
			<div class="t">
        <div class="t">
          <div class="t"></div>
        </div>
      </div>
      <div class="m" align="left">			
				<div class="far-right">
							<div class="button1-left"><div class="help"><a href="http://www.joomleague.de" alt="<?php echo _JL_ADMIN_MANUAL;?>" title="<?php echo _JL_ADMIN_MANUAL;?>" target="blank"><?php echo _JL_ADMIN_MANUAL;?></a></div></div>
							<div class="button1-left"><div class="forum"><a href="http://www.joomleague.de/forum/" alt="<?php echo _JL_ADMIN_FORUM;?>" title="<?php echo _JL_ADMIN_FORUM;?>" target="blank"><?php echo _JL_ADMIN_FORUM;?></a></div></div>
							<div class="button1-left"><div class="about"><a href="http://www.joomleague.de" alt="<?php echo _JL_ADMIN_INFO;?>" title="<?php echo _JL_ADMIN_INFO;?>" target="blank"><?php echo _JL_ADMIN_INFO;?></a></div></div>
				</div>
				<div class="button1-left"><div class="blank"><a href="index2.php?option=com_joomleague"></a></div></div><span class="step"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_CLUBS;?></span>
			</div>
      <div class="b">
        <div class="b">
          <div class="b"></div>
        </div>
      </div>
    </div>
<!-- Header END -->     

    <div id="installer">
    
<!-- Title 1 START -->     
			<div class="t">
        <div class="t">
          <div class="t"></div>
        </div>
      </div>
      <div class="m" align="left">
				<h2><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_TITLE;?></h2>
<!-- Titel 1 END -->

<!-- Content 1 START -->			
				<div class="install-text">
	<table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_NAME;?></td>
		<td width="270"><input class="inputbox" type="text" name="name" size="50" maxlength="250" value="<?php echo $row->name;?>" /></td>
	</tr>
	<?php
	if ($task == 'new')	{
  ?>
	<tr>
    <td width="20%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_CREATE_TEAM;?></td>
    <td width="80%"><input type="checkbox" name="createTeam" /></td>
  </tr>
  <?php
	}
  ?>
  <tr>
			<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_ADMIN;?></td>
			<td><?php echo $user_list; ?></td>
	</tr>
  <tr>
    <td align="right" valign="top"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_ADRESS;?></td>
		<td width="270"><textarea class="_inputbox" name="address" cols="50" rows="2" maxlength="100"><?php echo $row->address;?></textarea></td>
	</tr>
	<tr>
		<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_POSTAL_CODE;?></td>
		<td width="270"><input class="inputbox" type="text" name="zipcode" size="10" maxlength="10" value="<?php echo $row->zipcode;?>" /></td>
	</tr>
	<tr>
		<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_TOWN;?></td>
		<td width="270"><input class="inputbox" type="text" name="location" size="30" maxlength="50" value="<?php echo $row->location;?>" /></td>
	</tr>
	<tr>
		<td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_STATE;?></td>
		<td width="270"><input class="inputbox" type="text" name="state" size="30" maxlength="50" value="<?php echo $row->state;?>" /></td>
	</tr>
	<tr>
		  <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_COUNTRY;?></td>
		  <td width="270">
		    <?php echo $clist;?>
		  </td>
		</tr>
	<tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_PHONE;?></td>
    <td width="270">
		  <input class="inputbox" type="text" name="phone" size="20" maxlength="20" value="<?php echo $row->phone;?>" />
    </td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_FAX;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="fax" size="20" maxlength="20" value="<?php echo $row->fax;?>" />
		</td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_MAIL;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="email" size="50" maxlength="255" value="<?php echo $row->email;?>" />
		</td>
  </tr>
	<tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_INTERNET;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="website" size="50" maxlength="250" value="<?php echo $row->website;?>" />
		</td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_MANAGER;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="manager" size="50" maxlength="250" value="<?php echo $row->manager;?>" />
		</td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_PRESIDENT;?></td>
		<td width="270">
		  <input class="inputbox" type="text" name="president" size="50" maxlength="250" value="<?php echo $row->president;?>" />
		</td>
  </tr>
  <tr>
    <td align="right"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_FOUNDED;?></td>
    <td width="270">
      <input class="inputbox" type="text" name="founded" id="team_born" size="10" maxlength="19" value="<?php echo $row->founded;?>" />
    </td>
  </tr>
  <tr>
		  <td width="20%" align="right"><?php echo _JL_ADMIN_EDIT_FORM_PLAYGROUNDS_TITLE;?></td>
			<td width="80%">
				<?php echo $playgroundslist; ?>
			</td>
	</tr>
   </table>
				</div>
<!-- Content 1 END -->				

<!-- Info 1 START -->
				<div class="install-body" style="width:250px;">
    			<div class="t">
            <div class="t">
              <div class="t"></div>
            </div>
          </div>
          <div class="m">
						<fieldset>
							<table class="content">
							<tr>
								<td><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_HINT1;?>
								</td>
							</tr>
							</table>
						</fieldset>

					</div>
          <div class="b">
            <div class="b">
              <div class="b"></div>
            </div>
          </div>
					<div class="clr"></div>
				</div>
<!-- Info 1 END -->
				
<!-- Title 2 START -->  
        <div class="newsection"></div>
        	<h2><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_TITLE2;?></h2>
<!-- Title 2 END -->
          	
<!-- Content 2 START -->	          	
				<div class="install-text">
   <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
<!-- If there is no logo selected, use default logo -->
<?php
     if (is_null($row->logo_big)) $logo_big="images/joomleague/placeholders/placeholder_150.png"; else $logo_big=$row->logo_big;
?>    
  <tr>
    <td><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_BIG;?></td>
    <td width="270"><?php echo sprintf("<img id='big' src=%s/%s alt='%s' title='%s'>",_JOOMLA_JL_LIVE_SITE,$logo_big,$logo_big,$logo_big); ?></td>
  </tr>
  </table>
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_SELECT_LOGO; ?></td>
    <td width="270"><?php echo $logo_big_list; ?></td>
  </tr> 
	<tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_CUSTOM_LOCATION; ?></td>
    <td width="270">
      <?php echo _JOOMLA_JL_LIVE_SITE; ?>/<input class="inputbox" type="text" id="logo_big" name="logo_big" size="25" maxlength="250" 
             value="<?php echo $logo_big;?>" 
             onchange="updateClubLogo('big', this);"
             />
    </td>
  </tr>
  </table><br /><br /><br />
<!-- If there is no logo selected, use default logo -->
<?php
     if (is_null($row->logo_middle)) $logo_middle="images/joomleague/placeholders/placeholder_50.png"; else $logo_middle=$row->logo_middle;
?>      
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_MIDDLE;?></td>
    <td width="270"><?php echo sprintf("<img id='medium' src=%s/%s alt='%s' title='%s'>",_JOOMLA_JL_LIVE_SITE,$logo_middle,$logo_middle,$logo_middle); ?></td>
  </tr>
  </table>
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">  
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_SELECT_LOGO; ?></td>
    <td width="270"><?php echo $logo_middle_list; ?></td>
  </tr> 
	<tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_CUSTOM_LOCATION; ?></td>
    <td width="270">
      <?php echo _JOOMLA_JL_LIVE_SITE; ?>/<input class="inputbox" type="text" id="logo_middle" name="logo_middle" size="25" maxlength="250" 
             value="<?php echo $logo_middle;?>" 
             onchange="updateClubLogo('medium', this);"
             />
    </td>
  </tr>
   </table><br /><br /><br />  
<!-- If there is no logo selected, use default logo -->
<?php
     if (is_null($row->logo_small)) $logo_small="images/joomleague/placeholders/placeholder_small.gif"; else $logo_small=$row->logo_small;
?>      
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_SMALL;?></td>
    <td width="270"><?php echo sprintf("<img id='small' src=%s/%s alt='%s' title='%s'>",_JOOMLA_JL_LIVE_SITE,$logo_small,$logo_small,$logo_small); ?></td>
  </tr>
  </table>
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_SELECT_LOGO; ?></td>
    <td width="270"><?php echo $logo_small_list; ?></td>
  </tr> 
	<tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_LOGO_CUSTOM_LOCATION; ?></td>
    <td width="270">
      <?php echo _JOOMLA_JL_LIVE_SITE; ?>/<input class="inputbox" type="text" id="logo_small" name="logo_small" size="25" maxlength="250" 
             value="<?php echo $logo_small;?>" 
             onchange="updateClubLogo('small', this);"
             />
    </td>
  </tr>
   </table>
				</div>
<!-- Content 2 END -->
	
<!-- Info 2 START -->	
				<div class="install-body" style="width:250px;">
    			<div class="t">
            <div class="t">

              <div class="t"></div>
            </div>
          </div>
          <div class="m">
						<fieldset>

							<table class="content">
							
							<tr>
								<td><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_HINT2;?>
								</td>
							</tr>
							</table>
						</fieldset>

					</div>
          <div class="b">
            <div class="b">
              <div class="b"></div>
            </div>
          </div>
					<div class="clr"></div>
				</div>
<!-- Info 2 END -->

        <div class="newsection"></div><?php
/*
      	<h2><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_TITLE3;?></h2>		

<!-- Info 3 START -->   			
		<div id="step">
			<div class="t">
        <div class="t">
          <div class="t"></div>
        </div>
      </div>
      <div class="m" align="left">
<table class="content" cellpadding="4">
 <tr>
  <td><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_HINT3;?>
  </td>
  
 </tr>
</table>
			</div>
      <div class="b">
        <div class="b">
          <div class="b"></div>
        </div>
      </div>
    </div>
<!-- Info 3 END -->     

<!-- Content 3 START -->				
				<div class="install-text2">
   <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
<!-- If there is no logo selected, use default logo -->
<?php
     if (is_null($row->stadium_picture)) $stadium_picture="components/com_joomleague/images/placeholders/placeholder_450.png"; else $stadium_picture=$row->stadium_picture;
?>    
  <tr>
    <td align="left"><?php echo _JL_ADMIN_EDIT_FORM_CLUBS_STADIUM_PICTURE;?></td>
    <td width="270"><?php if($stadium_picture != "") echo sprintf("<img src=%s/%s>",_JOOMLA_JL_LIVE_SITE,$stadium_picture); ?></td>
  </tr>
  </table>
  <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">  
	<tr>
		<td align="left"><?php echo _JOOMLA_JL_LIVE_SITE;?>/</td>
		<td width="270"><input class="inputbox" type="text" name="stadium_picture" size="50" maxlength="255" value="<?php echo $stadium_picture;?>" /></td>
  </tr>
   </table>
				</div>
<!-- Content 3 END -->
*/
?>
        <div class="clr"></div>
      </div>

      <div class="b">
        <div class="b">
          <div class="b"></div>
        </div>
      </div>
		</div>
	</div>
</div>
<div class="clr"></div>
  <input type="hidden" name="id" value="<?php echo $row->id; ?>" />
  <input type="hidden" name="option" value="<?php echo JL_OPTION;?>" />
  <input type="hidden" name="act" value="<?php echo JL_ACTION;?>" />
  <input type="hidden" name="task" value="" />
</form>
